<template>
  <div class="search-song-Lists">
    <content-list :contentList="albumDatas"></content-list>
  </div>
</template>

<script>
import ContentList from '../ContentList'
import api from '../../api/index'

export default {
  name: 'search-song-Lists',
  components: {
    ContentList
  },
  data () {
    return {
      albumDatas: []
    }
  },
  mounted () {
    this.getSearchList()
  },
  methods: {
    getSearchList () {
      if (!this.$route.query.keywords) {
        this.notify('您输入内容为空', 'warning')
      } else if (this.$route.query.keywords) {
        api.songListAPI.getSongListOfLikeTitle(this.$route.query.keywords)
          .then(res => {
            this.albumDatas = res.data
          })
      } else {
        this.notify('暂无该歌曲内容', 'error')
      }
    }
  }
}
</script>

<style scoped>
.search-song-Lists{
  min-height: 300px;
  margin-top: 50px;
}
</style>
